#include <cstring>
#include <iostream>
#include <vector>
using namespace std;

class WeightedUnionSet {
public:
    WeightedUnionSet(int n) :fa(n + 1), val(n + 1) {
        for(int i = 0; i <= n; i++) {
            fa[i]  = i;
            val[i] = 0;
        }
    }
    // 路径压缩
    int get(int x) {
        if(fa[x] == x) return x;
        int root = get(fa[x]);
        val[x] = (val[x] + val[fa[x]]) % 3;
        return fa[x] = root;
        // return fa[x] = (fa[x] == x ? x : get(fa[x]));
    }
    void merge(int a, int b, int t) {
        int aa = get(a), bb = get(b);
        if(aa == bb) return ;
        fa[aa] = bb;
        val[aa] = (t - val[a] + val[b] + 3) % 3;
        return ;
    }
    vector<int> fa, val;
};

int main() {
    char s[15] = "123456";
    std::cout << s[0] << " " << s[5] << std::endl; 
    std::cout << strlen(s);
    std::cout << std::endl;
    return 0;
}